# Contributor: Guy Godfroy <guy.godfroy@gugod.fr>
# Maintainer: Guy Godfroy <guy.godfroy@gugod.fr>
pkgname=soundconverter
pkgver=4.0.5
pkgrel=0
pkgdesc="GNOME powered sound conversion"
url="https://soundconverter.org"
arch="noarch"
license="GPL-3.0-or-later"
depends="py3-gobject3 gst-plugins-base gtk+3.0"
makedepends="py3-gpep517 py3-setuptools py3-wheel py3-distutils-extra intltool"
checkdepends="pytest"
subpackages="$pkgname-pyc $pkgname-doc $pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/kassoulet/soundconverter/archive/refs/tags/$pkgver.tar.gz"
options="!check" #I can't make test suite work for now

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 setup.py install
	.testenv/bin/python3 tests/test.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
efd96fcf1f75381c985cbc7cc849462fc424e7b54fcbbb5e63e49e32b195dfab43806fecbc4e7f9a7f70b0df4e9a6d511b07dcaaca5eaa5e29bc49e1e66acb4b  soundconverter-4.0.5.tar.gz
"
